home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / PMUPDT13.ZIP / NED.ZIP / NED_DEMO.ASM < prev    next >
Encoding:
Assembly Source File  |  1992-10-18  |  1.5 KB  |  74 lines

  1. .model tiny
  2. .code
  3.         org    0100h
  4.  
  5. extrn        ned_end:abs
  6. extrn        nuke_enc_dev:near
  7.  
  8. ; This bit here (main) is just a demonstration shell to show off N.E.D's
  9. ; capabilities.  Every time this file is executed, it will be encrypted
  10. ; with a totally different encryption scheme.
  11.  
  12. main        proc    near
  13.         call    there
  14. there:        pop    bp
  15.         sub    bp,offset there
  16.  
  17.         mov    ah,09h
  18.         lea    dx,[bp + start_message]
  19.         int    021h
  20.  
  21. ; Arguments:    AX = offset of buffer to hold data
  22. ;        BX = offset of code start
  23. ;        CX = offset of the virus in memory (next time around!)
  24. ;        DX = length of code to copy and encrypt
  25. ;        SI = options:
  26. ;            bit 0:    dummy instructions
  27. ;            bit 1:    MOV variance
  28. ;            bit 2:  ADD/SUB substitution
  29. ;            bit 3:  garbage code
  30. ;            bit 4:  don't assume DS = CS
  31. ;            bits 5-15:  reserved
  32. ;
  33. ; Returns:    AX = size of generated decryption routine and encrypted code
  34.  
  35.         lea    ax,[bp + ned_end]
  36.         lea    bx,[bp + main]
  37.         mov    cx,0100h
  38.         mov    dx,end_of_code - main
  39.         mov    si,0000000000001111b
  40.         call    nuke_enc_dev
  41.         push    ax
  42.  
  43.         mov    ax,03D02h
  44.         lea    dx,[bp + filename]
  45.         int    021h
  46.         xchg    bx,ax
  47.  
  48.         pop    cx
  49.         mov    ah,040h
  50.         lea    dx,[bp + ned_end]
  51.         int    021h
  52.  
  53.         mov    ah,040h
  54.         xor    cx,cx
  55.         int    021h
  56.  
  57.         mov    ah,03Eh
  58.         int    021h
  59.  
  60.         mov    ah,09h
  61.         lea    dx,[bp + end_message]
  62.         int    021h
  63.  
  64.         mov    ax,04C00h
  65.         int    021h
  66.  
  67. filename    db    "NED_DEMO.COM",0
  68. start_message    db    "Beginning mutation...","$"
  69. end_message    db    "mutation successful!",13,10,"$"
  70. main        endp
  71.  
  72. end_of_code    label    near
  73.  
  74.         end    main